package com.vehicle_information_management_system.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
<<<<<<< HEAD
=======
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
>>>>>>> 629a544 (update)

import java.util.Date;

@Data
<<<<<<< HEAD
public class VehicleDto {

    @TableId(value = "vehicle_id", type = IdType.AUTO)
    private Integer vehicleId;

    @TableField(value = "license_plate")
    private String licensePlate;

    @TableField(value = "manufacturer")
    private String manufacturer;

    @TableField(value = "production_date")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date productionDate;

    @TableField(value = "load_capacity")
    private Double loadCapacity;

    @TableField(value = "driver_id")
    private Integer driverId;

    @TableField(value = "use_status")
=======
@Document(indexName = "vehicle_info")
public class VehicleDto {

    @Id
    @Field(type = FieldType.Integer)
    private Integer vehicleId;

    @Field(type = FieldType.Text)
    private String licensePlate;

    @Field(type = FieldType.Text)
    private String manufacturer;

    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @Field(type = FieldType.Date)
    private Date productionDate;


    @Field(type = FieldType.Double)
    private Double loadCapacity;


    @Field(type = FieldType.Integer)
    private Integer driverId;


    @Field(type = FieldType.Integer)
>>>>>>> 629a544 (update)
    private Integer useStatus;
}
